import torch

# model = torch.hub.load("/Users/jiayang/Desktop/yolov5-master","custom","/Users/jiayang/Desktop/yolov5-master/pretrained/yolov5s.pt",source='local')
model = torch.hub.load("/Users/jiayang/Desktop/yolov5-master","custom","/Users/jiayang/Desktop/yolov5-master/pretrained/best.pt",source='local')
# img = "data/images/bus.jpg"  # or file, Path, PIL, OpenCV, numpy, list
img = "data/images/jia.jpg"  # or file, Path, PIL, OpenCV, numpy, list

results = model(img)

results.show()  # or .show(), .save(), .crop(), .pandas(), etc.

